<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>金币录入管理</title>
	  <meta name="decorator" content="default"/>
	<script type="text/javascript">
  var rr=null;
  $(function(){	  
	  var branchid =  $("#branchid").val();
	//初始化数据
		//获取金币所属活动	 
			$.ajax({  
			        type:"POST",  
			         url: "${ctx}/goldinput/goldcoin/getgoldCoinActivity?branchId="+branchid,
			         dataType:'json',  
			         async:false,  
			          success:function(result){  
			        	   rr = eval(result);	 
				        }		 
		    });	
	  $("#aa").html("<select  name='goldCoinActivity' class='input-xlarge required' id='goldCoinActivity' onchange='goldCoinActivityNum()'  >"+
		         "<c:forEach items='${list}' var='GoldcoinActivitycashpool' varStatus='i' > " +
		         " <option value='${GoldcoinActivitycashpool.activityid}'>${GoldcoinActivitycashpool.activityname}</option> "+
		         " </c:forEach> " +
	              "  </select> "+
	             " <span  id='span8' style='display:none;' ><em style='color:red' class='goldcoinactivity'></em> </span>"+
				 "  <span class='help-inline'><font color='red'>*</font> </span> "
	 ) 
	 $("#mm").html("<select name='goldcoinvaliditystyle' style='width: 170px; height: 30px;' id='ValidityStyle' onchange='getValidityStyle()' >"  
    + "<option value=''>请选择</option>"
    + "<option value='01'>固定时间段</option>"
    + "<option value='02'>按季度计算有效期</option>"
    +"<option value='03'>有效天数</option>"	
    +"</select>"
    + "<span  id='span10' style='display:none;' ><em style='color:red'class='goldcoin_validitystyle'></em></span>"
	+"<span class='help-inline'><font color='red'>*</font> </span>"
    )  
    var aa=	$("#goldcoin_activity").val().trim();
	  $("#goldCoinActivity").val(aa);   
	  goldCoinActivityNum();
	         date();	 		
			 var gg=$("#goldcoin_validitystyle").val().trim();
		     $("#ValidityStyle").val(gg);
		     if(gg=='02'){  	
		    	 $("#div2").html(
		    	    		"<select  style='width: 100px; height: 30px;' name='years'  id='years' >"+	
		    		       	 " <option value=''>请选择</option>"+
		    			" </select> " +
		    		    "  <select  style='width: 100px; height: 30px;' name='mouth' id='mouth' > "+
		    		    " <option value=''>请选择</option>"+
		    		    " <option value='03月31号'>03月31号</option>"+
		    		    "<option value='06月30号'>06月30号</option>"+
		    		    "<option value='09月30号'>09月30号</option>"+
		    		    "<option value='12月31号'>12月31号</option>	"+	  	  
		    			" </select>" +
		    		  "  <span  id='span12' style='display:none;' ><em style='color:red' class='goldcoin_div2'></em></span> "  			
		    	    		)
                 date();
		    	 var goldcoin_year=	$("#goldcoin_year").val().trim();
		    	 var goldcoin_mouths=$("#goldcoin_mouths").val().trim();
		    	 $("#years").val(goldcoin_year); 
		    	 $("#mouth").val(goldcoin_mouths);     	 
		    	 $("#div2").show();$("#div1").hide(); $("#div3").hide(); 	 
		     }else if(gg=='01'){
		    	 $("#div1").show();$("#div3").hide();$("#div2").hide(); 
		     }else if(gg=='03'){
		    	 $("#div1").hide();$("#div3").show();$("#div2").hide();	  	 
		     }
           });
		function  goldCoinActivityNum(){
			var branchid =  $("#branchid").val();
			var goldCoinActivity = $("#goldCoinActivity").val().trim();
			//获取金币所属活动	 
			var mm=0;
			//获得该活动的审核中的占用的金额和个数
			$.ajax({  
		        type:"POST",  
		         url: "${ctx}/goldinput/goldcoin/goldcoinsum?branchId="+branchid,
		         dataType:'json',
		         data:"goldCoinActivity="+goldCoinActivity,
		         async:false,  
		          success:function(result){  
		        	   mm = eval(result);
		        	  
             }		 
	         });
			if(goldCoinActivity!=""){			
				  for(i=0 ; i<rr.length;i++){
		               if(rr[i].activityid==goldCoinActivity){ 
		            	  
		            	 var canUseCash=  rr[i].canusecash;	
		            	   $(".activity").text("["+rr[i].activityname+"]");   
		            	   $(".inAmountem").text("可录金额为："+(rr[i].canusecash-mm/100)+' (元 ) ');
		            	   var gg=	   floatMul(rr[i].canusecash,100);
		            	   $(".num").text("可录个数为："+(gg-mm)+' (个) ');
		            	   num=rr[i].canusecash*100-mm;
		            	   $("#span1").show();  
		               }
		               }
		        }
			else{
				$("#span1").hide(); 
			}
			
		}
		
		
		 //带小数的乘法运算
		 function floatMul(arg1,arg2)   {     
			    var m=0,s1=arg1.toString(),s2=arg2.toString();     
			    try{m+=s1.split(".")[1].length}catch(e){}     
			    try{m+=s2.split(".")[1].length}catch(e){}     
			    return Number(s1.replace(".",""))*Number(s2.replace(".",""))/Math.pow(10,m);     
			}     

	function date(){
		 //下拉框获得当前年份加5年	 
	    var date=new Date;  
		var year=date.getFullYear(); 
		var y=new Array();//创建数组  储存年份
		for(i=0;i<=5;i++){
			y[i]=year+i+"年";	
		}
		for(i=0;i<y.length;i++){
                $("#years").append(
                        "<option value='"+y[i]+"'>"+y[i]
                                + "</option>");
        }	
	    }	

		//金币有效期
		function getValidityStyle(){		
			var ValidityStyle = $('#ValidityStyle option:selected') .val(); 		
			if(ValidityStyle=="01"){
				$("#div1").show();$("#div3").hide();$("#div2").hide();
			}else if(ValidityStyle=="02"){		
			    $("#div2").show();$("#div1").hide(); $("#div3").hide();    
			  }else  if(ValidityStyle=="03"){
				$("#div3").show();$("#div1").hide();$("#div2").hide();
			}else if(ValidityStyle=="请选择"){
				$("#div1").hide();$("#div3").hide();$("#div2").hide();	
			}
			} 
		//判断日期，时间大小 
		function compareTime(startDate, endDate) {  
		 if (startDate!=null&&startDate!=''&&startDate!='undefined'&&endDate!=null&&endDate!=''&&endDate!='undefined') {  
			 $("#span5").hide();
			 var startDateTemp = startDate.split(" ");  
		    var endDateTemp = endDate.split(" ");  

		    var arrStartDate = startDateTemp[0].split("-");  
		    var arrEndDate = endDateTemp[0].split("-");  

		    var arrStartTime = startDateTemp[1].split(":");  
		    var arrEndTime = endDateTemp[1].split(":");  

		var allStartDate = new Date(arrStartDate[0], arrStartDate[1], arrStartDate[2], arrStartTime[0], arrStartTime[1], arrStartTime[2]);  
		var allEndDate = new Date(arrEndDate[0], arrEndDate[1], arrEndDate[2], arrEndTime[0], arrEndTime[1], arrEndTime[2]);  

		if (allStartDate.getTime() >= allEndDate.getTime()) {  
		       // alert("领取开始时间不能大于等于领取结束时间，不能通过"); 
		        $(".goldcoincollection_time").text("领取开始时间不能大于等于领取结束时间");
				 $("#span3").show();   
		        return false;  
		} else {  
		   // alert("startTime小于endTime，所以通过了");     
		    $("#span3").hide();
		    return true;  
		       }  
		} else {  
			  $(".goldcoincollection_time_check").text("领取时间不能为空");
			   $("#span5").show();  	
		    return false;  
		      }  
		} 
		function compareTime1(startDate, endDate) {  
			 if (startDate!=null&&startDate!=''&&startDate!='undefined'&&endDate!=null&&endDate!=''&&endDate!='undefined') {  
				 $("#span5").hide();

			if (startDate >= endDate) {  

			       // alert("领取开始时间不能大于等于领取结束时间，不能通过"); 
			        $(".goldcoincollection_time_activity").text("领取开始时间不能小于等于活动开始时间");
					 $("#span20").show();   
			        return false;  
			} else {  
			   // alert("startTime小于endTime，所以通过了");     
			    $("#span20").hide();
			    return true;  
			       }  
			} else { 
				   $(".goldcoincollection_time_check").text("领取时间不能为空");
				   $("#span5").show();  	
			    return false;  
			      }  
			} 
			
		function compareTime2(startDate, endDate) {  
			 if (startDate!=null&&startDate!=''&&startDate!='undefined'&&endDate!=null&&endDate!=''&&endDate!='undefined') {  
				 $("#span5").hide();

			if (startDate >= endDate) {  
		
			       // alert("领取开始时间不能大于等于领取结束时间，不能通过"); 
			        $(".goldcoincollection_time_activity_gold").text("领取结束时间不能大于等于活动结束时间");
					 $("#span21").show();   
			        return false;  
			} else {  
			   // alert("startTime小于endTime，所以通过了");     
			    $("#span21").hide();
			    return true;  
			       }  
			} else { 

				   $(".goldcoincollection_time_check").text("领取时间不能为空");
				   $("#span5").show();  	
			    return false;  
			      }  
			} 

		//判断日期，时间大小 
		function compareTimeCoin(startDate, endDate) {  
		 if (startDate!=null&&startDate!=''&&startDate!='undefined'&&endDate!=null&&endDate!=''&&endDate!='undefined') {  
			 $("#span14").hide();
			 var startDateTemp = startDate.split(" ");  
		    var endDateTemp = endDate.split(" ");  

		    var arrStartDate = startDateTemp[0].split("-");  
		    var arrEndDate = endDateTemp[0].split("-");  

		    var arrStartTime = startDateTemp[1].split(":");  
		    var arrEndTime = endDateTemp[1].split(":");  

		var allStartDate = new Date(arrStartDate[0], arrStartDate[1], arrStartDate[2], arrStartTime[0], arrStartTime[1], arrStartTime[2]);  
		var allEndDate = new Date(arrEndDate[0], arrEndDate[1], arrEndDate[2], arrEndTime[0], arrEndTime[1], arrEndTime[2]);  

		if (allStartDate.getTime() >= allEndDate.getTime()) {  
		       // alert("领取开始时间不能大于等于领取结束时间，不能通过"); 
		        $(".goldcoin_div1_check").text("开始时间不能大于等于结束时间");
				 $("#span15").show();   
		        return false;  
		} else {  
		   // alert("startTime小于endTime，所以通过了");     
		    $("#span15").hide();
		    return true;  
		       }  
		} else {  
			  $(".goldcoin_div1").text("时间不能为空");
			   $("#span14").show();  	
		      return false;  
		      }  
		}   
		//检验验证
		function submitCheck(){	
		//金币名称非空判断
	 	var goldcoinname=$('#goldcoinname').val();
		if(goldcoinname!=null&&goldcoinname!=''&&goldcoinname!='undefined' && goldcoinname.length <=50){
			 $("#span9").hide();
			
		}else{
			   $(".goldcoin_name").text("金币名称不能为空,并且长度不能大于50");
			     $("#span9").show(); 
			      return false;
		}		
		//检验金币唯一，非空判断
	    var flag=true;
		var goldcoinmark=$('#goldcoinmark').val();
		var cc=/^[A-Za-z0-9]+$/;
		if(goldcoinmark!=null&&goldcoinmark!=''&&goldcoinmark!='undefined'&& cc.test(goldcoinmark) && goldcoinmark.length<60){
				$("#span4").hide();
				var ll=$("#goldcoin_mark").val().trim();
				if(ll!=goldcoinmark){			
				$.ajax({  
				        type:"POST",  
				         url: "${ctx}/goldinput/goldcoin/ifOnlymark",
				         dataType:'json', 
				         data:"goldcoinmark="+goldcoinmark,
				         async:false,  
				         success:function(result){  
				        	  var rr = eval(result);
				        	  if(rr!=0){
				        		 flag=false;
				        		 $(".goldcoin_nmark").text("金币标识必须唯一");
				  			     $("#span2").show();
				        	  }else{
				        		  $("#span2").hide(); 
				        	  }
				        	  
					        }		 
			    });	
				}
			 }else {
				 flag=false;
        		 $(".goldcoin_nmark_check").text("金币标识不能为空且必须有数字和字母构成并且长度小于60");
  			     $("#span4").show();	 
			 }  	   
		   if(!flag){
			   return false;
		   }
		   //活动非空检验
		    var goldCoinActivity = $("#goldCoinActivity").val();
		    if(goldCoinActivity !=null&&goldCoinActivity !=''&&goldCoinActivity !='undefined'){  
		    	$("#span8").hide();
		    }else{
		    	 $(".goldcoinactivity").text("金币活动不能为空");
  			     $("#span8").show();	
		    	return false;
		    } 
		   //领取时间检验
		   var bt = $("#goldcoincollectionstart").val();
	       var et = $("#goldcoincollectionend").val();
	       var begin=null;
	       var end =null;
	       var goldCoinActivity = $("#goldCoinActivity").val().trim();
	       if(goldCoinActivity!=""){
				  for(i=0 ; i<rr.length;i++){
		               if(rr[i].activityid==goldCoinActivity){  	
		            	begin= rr[i].begin;
		            	end= rr[i].end; 
		               }
		               }
		        }
	          
	        var r1 = compareTime1(begin,bt);
	        var r2 = compareTime2(et,end);
		    var r = compareTime(bt,et);
		   if(!r1){
			   return false;
		   }
		   if(!r2){
			   return false;
		   }
		   if(!r) {	   
				return false;
			    }
	
		   //总个数检验
		   var goldcoindistributiontotalnumber = $("#goldcoindistributiontotalnumber").val();

		   if(goldcoindistributiontotalnumber!=null&&goldcoindistributiontotalnumber!=''&&goldcoindistributiontotalnumber!='undefined'){  
			   $("#span6").hide();
			   if(num<goldcoindistributiontotalnumber){
				   $(".activity_num_check").text("总个数不能大于领取最大个数");
				     $("#span7").show();   
				     return false;
			   }
		   }else{
			   $(".activity_check").text("总个数不能为空");
			     $("#span6").show();  
			     return false;
		   }
		   //金币有效其类型非空判断
		   
			var ValidityStyle=$("#ValidityStyle").val();
			if(ValidityStyle!=null&&ValidityStyle!=''&&ValidityStyle!='undefined'){
				 $("#span10").hide();
				 if(ValidityStyle=="01"){
					 var bt = $("#goldcoinvaliditystart").val();
				       var et = $("#goldcoinvalidityend").val();
					   var r = compareTimeCoin(bt,et);
					   if(!r) {	   
						return false;
					    }	 
				 }else if(ValidityStyle=="02"){
					var years= $("#years").val();
					var mouth= $("#mouth").val();
					if(years!=null&&years!=''&&years!='undefined'&&mouth!=null&&mouth!=''&&mouth!='undefined'){
						$("#span12").hide();
					}else{
						 $(".goldcoin_div2").text("按季度计算有效期时间不能为空  ");
					     $("#span12").show(); 
					      return false;
						
					}
	                }else if(ValidityStyle=="03"){
	                	var goldcoinvalidityday= $("#goldcoinvalidityday").val();
	                     var  aa=/^[0-9]*[1-9][0-9]*$/ ;
	                 	if(goldcoinvalidityday=null || goldcoinvalidityday =='' || goldcoinvalidityday=='undefined' || !aa.test(goldcoinvalidityday)){
							
	                		$(".goldcoin_div3").text("有效天数不能为空且为正整数  ");
						     $("#span13").show(); 
						      return false;				
						} 
	                 	else{
	                 		$("#span13").hide();
	                 	}	 
				 }		 
			  }else{
				   $(".goldcoin_validitystyle").text("金币有限期类型不能为空");
				     $("#span10").show(); 
				      return false;
			}
		 //描述非空判断
			var description=$("#description").val();
			if(description!=null&&description!=''&&description!='undefined'){
				 $("#span11").hide();
			}else{
				   $(".goldcoin_description").text("金币描述不能为空");
				     $("#span11").show(); 
				      return false;
			}
			return true;		
		}	
		
	
		//提交审核
		  function  reCheck() {  
		
	         //校验金币的唯一标识	     
		 	  var a = submitCheck();
		
				if(a){
	 	         var form = document.forms[0];   
	 	          form.method = "post";  
	 	          form.submit();  
			}   
			 
 	    }
		// 作废	
		function cancel(){
			var id=$("#goldcoin_id").val();
			var branchid =  $("#branchid").val();
  		    $.ajax({  
			        type:"POST",  
			         url: "${ctx}/goldinput/goldcoin/cancelgoldcoin",
			         dataType:'json', 
			         data:{"id":id },
			         async:false,  
			         success:function(result){
			        	if(result.code='02'){
			        	 window.location.href="${ctx}/goldinput/goldcoin/nodistributionlist?branchId="+branchid;}
				        },
			             error:function(data){
			        	 alert("出错了,！！");
			        	 },   
		    });		
		}
	</script>
</head>
<body>
	<!--  -<ul class="nav nav-tabs">
		<li><a href="${ctx}/goldinput/goldcoin/">金币录入审核</a></li>
		<li class="active"><a href="${ctx}/goldinput/goldcoin/form?id=${goldcoin.id}">金币录入<shiro:hasPermission name="goldinput:goldcoin:edit">${not empty goldcoin.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="goldinput:goldcoin:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>-->

	     <li>金币管理->金币编辑</li>         

	<form:form id="inputForm" modelAttribute="goldcoin" action="${ctx}/goldinput/goldcoin/update" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		
		<sys:message content="${message}"/>		
		<div class="control-group">
			<label class="control-label"  >名称：</label>
			<div class="controls">
				<form:input path="goldcoinname" htmlEscape="false" maxlength="80" class="input-xlarge required"/>
				<input id="goldcoin_activity" value="${goldcoin.goldcoinactivity}"    type="hidden"  htmlEscape="false" maxlength="80" class="input-xlarge required"/>
				<input id="goldcoin_validitystyle" value="${goldcoin.goldcoinvaliditystyle }" type="hidden"   htmlEscape="false" maxlength="80" class="input-xlarge required"/>
				<input id="goldcoin_year" value="${year}" type="hidden"   htmlEscape="false" maxlength="80" class="input-xlarge required"/>
				<input id="goldcoin_mouths" value="${mouths}" type="hidden"   htmlEscape="false" maxlength="80" class="input-xlarge required"/>		
			    <input id="goldcoin_mark" value="${goldcoin.goldcoinmark}" type="hidden"   htmlEscape="false" maxlength="80" class="input-xlarge required"/>		
			    <input id="goldcoin_id" value="${goldcoin.id}" type="hidden"   htmlEscape="false" maxlength="80" class="input-xlarge required"/>		
                <span  id="span9" style="display:none;" ><em style="color:red" class="goldcoin_name"></em> </span>	
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">标识：</label>
			<div class="controls">
				<form:input path="goldcoinmark" htmlEscape="false" id="goldcoinmark"  maxlength="50" class="input-xlarge required"   readonly= "true" />
				<form:input path="branchid" htmlEscape="false" id="branchid" type="hidden"  maxlength="50" class="input-xlarge required"   />	
				<span  id="span2" style="display:none;" ><em style="color:red" class="goldcoin_nmark"></em> </span>
				<span  id="span4" style="display:none;" ><em style="color:red" class="goldcoin_nmark_check"></em> </span>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">金币所属活动：</label>
			<div class="controls" id ="aa" >

			  <select  name='goldCoinActivity' class='input-xlarge required' id='goldCoinActivity'>
			         <c:forEach items='${list}' var='GoldcoinActivitycashpool' varStatus='i' >
			          <option value='${GoldcoinActivitycashpool.activityid}'>${GoldcoinActivitycashpool.activityname}</option>
			          </c:forEach>
		      </select>
			 <span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">领取时间：</label>
			<div class="controls">
				<input name="goldcoincollectionstart" id="goldcoincollectionstart"   type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
					value="<fmt:formatDate value="${goldcoin.goldcoincollectionstart}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
			至
				<input name="goldcoincollectionend" id="goldcoincollectionend"  type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
					value="<fmt:formatDate value="${goldcoin.goldcoincollectionend}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
				<span  id="span3" style="display:none;" ><em style="color:red" class="goldcoincollection_time"></em> </span>
				<span  id="span5" style="display:none;" ><em style="color:red" class="goldcoincollection_time_check"></em> </span>		
				<span  id="span20" style="display:none;" ><em style="color:red" class="goldcoincollection_time_activity"></em> </span>		
				<span  id="span21" style="display:none;" ><em style="color:red" class="goldcoincollection_time_activity_gold"></em> </span>		
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">限领个数：</label>
			<div class="controls">
				<form:input path="goldcoinlimitnumber" htmlEscape="false" maxlength="8" class="input-small "/> 单位：个
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">发行总个数：</label>
			<div class="controls">
				<form:input path="goldcoindistributiontotalnumber" htmlEscape="false" maxlength="8" class="input-small required" /> 单位：个
			    <span class="help-inline"><font color="red">*</font> </span>
				<span  id="span1" style="display:none;" ><em style="color:blue" class="activity"></em><em style="color:blue" class="inAmountem"></em> <em style="color:blue" class="num"></em></span>
               <span  id="span6" style="display:none;" ><em style="color:red" class="activity_check"></em> </span>	       
                 <span  id="span7" style="display:none;" ><em style="color:red" class="activity_num_check"></em></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">金币有限期类型</label>
			<div class="controls"  id="mm">
			 <select name="goldcoinvaliditystyle" style="width: 170px; height: 30px;" id="ValidityStyle" onchange="getValidityStyle()" >	  
			        <option value="请选择">请选择</option>
		            <option value="01">固定时间段</option>
		            <option value="02">按季度计算有效期</option>
		            <option value="03">有效天数</option>	
			  
			  </select>
	
				<span class="help-inline"><font color="red">*</font> </span>
		</div>
		</div>
		<div class="control-group"  >
			<label class="control-label">金币有效期：</label>
			<div class="controls" >
				<div  id="div1"  style="display:none;" >
				<input name="goldcoinvaliditystart" id="goldcoinvaliditystart"   type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
					value="<fmt:formatDate value="${goldcoin.goldcoinvaliditystart}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
			   至
				<input name="goldcoinvalidityend" id="goldcoinvalidityend"  type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
					value="<fmt:formatDate value="${goldcoin.goldcoinvalidityend}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
			<span  id="span14" style="display:none;" ><em style="color:red" class="goldcoin_div1"></em></span>
			<span  id="span15" style="display:none;" ><em style="color:red" class="goldcoin_div1_check"></em></span>
			
			</div>
			
		     <div  id="div2"  style="display:none;" >
		      <select  style="width: 100px; height: 30px;" name="years"  id="years" >	
		       	   <option value="请选择">请选择</option>
			 </select>
		     <select  style="width: 100px; height: 30px;" name="mouth" id="mouth" >
		            <option value="请选择">请选择</option>
		            <option value="03月31号">03月31号</option>
		            <option value="06月30号">06月30号</option>
		            <option value="09月30号">09月30号</option>
		            <option value="12月31号">12月31号</option>	 	  	  
			 </select>	 
			</div>
	
			<div id="div3"  style="display:none;">
				<form:input path="goldcoinvalidityday" htmlEscape="false" maxlength="8" class="input-small "/> 单位 ：天
			<span  id="span13" style="display:none;" ><em style="color:red" class="goldcoin_div3"></em></span> 
			</div>
			
			</div>
		</div>	
		<div class="control-group">
			<label class="control-label">描述：</label>
			<div class="controls">
				<form:input path="description" htmlEscape="false" maxlength="200" class="input-xlarge required"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>

		<div class="form-actions">
			<shiro:hasPermission name="goldinput:goldcoin:edit">
			<c:if test="${'02' eq goldcoin.status}">
			 <input type="button" id="btn_save1" value="重新提交审核"
				style="width: 90px; height: 40px; margin-top: 00px; background-color: #5599FF; color: #FFFFFF"
				onclick="reCheck()" />
				
			<input type="button" id="btn_save1" value="作废"
				style="width: 90px; height: 40px; margin-top: 00px; background-color: #5599FF; color: #FFFFFF"
				onclick="cancel()" />
				</c:if>		
			</shiro:hasPermission>	
		</div>
	</form:form>
</body>
</html>